/*
 * @Author: yeminglong
 * @Date: 2023-11-21 14:16:08
 * @LastEditTime: 2023-11-28 14:38:26
 * @LastEditors: yeminglong
 * @Description:
 */
import { JSEncrypt } from 'jsencrypt'

const PUBLIC_KEY =
  'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDaLRe493205T6+xpTqD3q2xtLEut8GPS6ter1mp507S8MutmRJ8mn8oBykNVFz8ZKCsOGI1UJZS2jNpEBOuCTu7GXZ/uTCBmLDigS5rG3YzlMkg0EdnyKxTRRLjoPUyIWSVKGZlU5VC/zBvB03qKZ3HpzHZHxGG/3z6E8aoXoPRwIDAQAB'
const PRIVATE_KEY = ''
const jsEncrypt = new JSEncrypt()
jsEncrypt.setPublicKey(PUBLIC_KEY)
// jsEncrypt.setPrivateKey(PRIVATE_KEY)
export function encrypt(str) {
  return jsEncrypt.encrypt(str)
}

export function decrypt(str) {
  return jsEncrypt.decrypt(str)
}
